home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 25
/
Mac Magazin and MacEasy Magazine CD - Issue 25.iso
/
Grafik & Text
/
Alpha
/
Tcl
/
Modes
/
latexKeys.tcl
< prev
next >
Wrap
Text File
|
1996-08-15
|
4KB
|
115 lines
#############################################################################
#############################################################################
#
# latexKeys.tcl (called from latex.tcl)
#
# Special LaTeX key bindings (see latexMenu.tcl and latexSmart.tcl for
# additional bindings)
#
# abbreviations: <o> = option, <z> = control, <s> = shift, <c> = command
#
#############################################################################
#
# Author: Tom Scavo <trscavo@syr.edu>
#
#############################################################################
#############################################################################
# Initial binding of LaTeX command keys.
proc bindLaTeXKeys {} {
proc bindKeypadKeys {} {
# Completely take over the keypad:
set mods {<> <c> <o> <z> <s> <co> <cz> <cs> <oz> <os> <zs> \
<coz> <cos> <ozs> <cozs>}
foreach mod $mods {
bind Kpad0 $mod dummyTeX "TeX"
bind Kpad1 $mod dummyTeX "TeX"
bind Kpad2 $mod dummyTeX "TeX"
bind Kpad3 $mod dummyTeX "TeX"
bind Kpad4 $mod dummyTeX "TeX"
bind Kpad5 $mod dummyTeX "TeX"
bind Kpad6 $mod dummyTeX "TeX"
bind Kpad7 $mod dummyTeX "TeX"
bind Kpad8 $mod dummyTeX "TeX"
bind Kpad9 $mod dummyTeX "TeX"
bind Kpad= $mod dummyTeX "TeX"
bind Kpad/ $mod dummyTeX "TeX"
bind Kpad* $mod dummyTeX "TeX"
bind Kpad- $mod dummyTeX "TeX"
bind Kpad+ $mod dummyTeX "TeX"
bind Enter $mod dummyTeX "TeX"
bind Kpad. $mod dummyTeX "TeX"
}
bind Kpad8 prevSubsection "TeX"
bind Kpad2 nextSubsection "TeX"
bind Kpad8 <s> prevSubsectionSelect "TeX"
bind Kpad2 <s> nextSubsectionSelect "TeX"
bind Kpad8 <c> prevSection "TeX"
bind Kpad2 <c> nextSection "TeX"
bind Kpad8 <sc> prevSectionSelect "TeX"
bind Kpad2 <sc> nextSectionSelect "TeX"
bind Kpad4 prevCommand "TeX"
bind Kpad6 nextCommand "TeX"
bind Kpad4 <s> prevCommandSelect "TeX"
bind Kpad6 <s> nextCommandSelect "TeX"
bind Kpad4 <so> prevCommandSelectWithArgs "TeX"
bind Kpad6 <so> nextCommandSelectWithArgs "TeX"
bind Kpad4 <c> prevEnvironment "TeX"
bind Kpad6 <c> nextEnvironment "TeX"
bind Kpad4 <sc> prevEnvironmentSelect "TeX"
bind Kpad6 <sc> nextEnvironmentSelect "TeX"
}
proc bindGreekKeys {func} {
eval $func 'm' <z> prefixChar "TeX"
eval $func 'a' <M> alpha "TeX"
eval $func 'b' <M> beta "TeX"
eval $func 'c' <M> chi "TeX"
eval $func 'd' <M> delta "TeX"
eval $func 'd' <sM> Delta "TeX"
eval $func 'e' <M> epsilon "TeX"
eval $func 'e' <zM> varepsilon "TeX"
eval $func 'f' <M> phi "TeX"
eval $func 'f' <sM> Phi "TeX"
eval $func 'f' <zM> varphi "TeX"
eval $func 'g' <M> gamma "TeX"
eval $func 'g' <sM> Gamma "TeX"
eval $func 'h' <M> eta "TeX"
eval $func 'i' <M> iota "TeX"
eval $func 'k' <M> kappa "TeX"
eval $func 'l' <M> lambda "TeX"
eval $func 'l' <sM> Lambda "TeX"
eval $func 'm' <M> mu "TeX"
eval $func 'n' <M> nu "TeX"
eval $func 'o' <M> omicron "TeX"
eval $func 'p' <M> pi "TeX"
eval $func 'p' <sM> Pi "TeX"
eval $func 'p' <zM> varpi "TeX"
eval $func 'q' <M> theta "TeX"
eval $func 'q' <sM> Theta "TeX"
eval $func 'q' <zM> vartheta "TeX"
eval $func 'r' <M> rho "TeX"
eval $func 'r' <zM> varrho "TeX"
eval $func 's' <M> sigma "TeX"
eval $func 's' <sM> Sigma "TeX"
eval $func 's' <zM> varsigma "TeX"
eval $func 't' <M> tau "TeX"
eval $func 'u' <M> upsilon "TeX"
eval $func 'u' <sM> Upsilon "TeX"
eval $func 'v' <M> nabla "TeX"
eval $func 'w' <M> omega "TeX"
eval $func 'w' <sM> Omega "TeX"
eval $func 'x' <M> xi "TeX"
eval $func 'x' <sM> Xi "TeX"
eval $func 'y' <M> psi "TeX"
eval $func 'y' <sM> Psi "TeX"
eval $func 'z' <M> zeta "TeX"
}
bindKeypadKeys
bindGreekKeys "bind"
}